﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Cfg;
using NHibernate.Mapping;

namespace NHibernate.Audit.Mapping
{
    public class ConfigurationPersistentClassSource : IPersistentClassSource 
    {

        public ConfigurationPersistentClassSource(Configuration Configuration)
        {
            configuration = Configuration;
            configuration.BuildMappings();
        }

        protected Configuration configuration;

        #region IPersistentClassSource Members

        public IEnumerable<PersistentClass> Classes
        {
            get { return configuration.ClassMappings.AsEnumerable<PersistentClass>(); }
        }

        #endregion
    }
}
